package TempPackage;

import java.lang.reflect.InvocationTargetException;

import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JRootPane;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

import org.jvnet.substance.skin.SubstanceEmeraldDuskLookAndFeel;
import org.jvnet.substance.skin.SubstanceRavenLookAndFeel;
import org.jvnet.substance.skin.SubstanceTwilightLookAndFeel;

import GUI.IDGraphGUI;

public class MainGUI {
    static IDGraphGUI myGUI = new IDGraphGUI("AmoAnalyzer");
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Runnable worker = new Runnable() {
				public void run() {
					try {						
						UIManager.setLookAndFeel(new SubstanceEmeraldDuskLookAndFeel());
						//UIManager.setLookAndFeel(new SubstanceTwilightLookAndFeel());
						JFrame.setDefaultLookAndFeelDecorated(true);
						JDialog.setDefaultLookAndFeelDecorated(true);
						myGUI.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
						myGUI.pack();
						myGUI.setVisible(true);
						myGUI.setExtendedState(JFrame.MAXIMIZED_BOTH);  
						//UIManager.setLookAndFeel(new SubstanceRavenLookAndFeel());
					} catch (UnsupportedLookAndFeelException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					}
				}
			};
			
			try {
				SwingUtilities.invokeAndWait(worker);
			} catch (InterruptedException e) {
				e.printStackTrace();
			} catch (InvocationTargetException e) {
				e.printStackTrace();
			}
		}
}
